<!DOCTYPE html>
<html lang="en">
<head>
  <script>
    window.addEventListener('error',(e)=>{
      console.log('index index index window.add error event--- on error', e)
      // console.log(e.target === window)
      let errorData
      if (e.target === window) {
        const { message, lineno, colno, error } = e
        errorData = { message, lineno, colno, error: error.stack }
      } else {
        const { nodeName, src, href, outerHTML } = e.target
        errorData = { nodeName, src, outerHTML, href }
        errorData.message = '资源加载错误'
      }
      console.log(errorData)
    })
  </script>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>首页</title>
</head>
<body>
  <div>
    首页
  </div>
  <button id="jumpPage">去分页</button>
  <script>
    const btn = document.getElementById('jumpPage')
    btn.addEventListener('click',()=>{
      window.open('./home.html')
    })
    console.log('0000000',aaaaaaaaaaaa)
  </script>
</body>
</html>